//一定要加入index.ts
import { world } from "@minecraft/server";
import { PLAYER_PROPERTY_KEY, PlayerProperty } from "./player_data/player_property";
import { DynamicJson } from "./dynamic_data/dynamic_json";

world.afterEvents.playerSpawn.subscribe((e) => {
  if (e.initialSpawn) {
    new DynamicJson<PlayerProperty>(e.player, PLAYER_PROPERTY_KEY, new PlayerProperty());
  }
});
